<%@ page contentType="text/html; charset=UTF-8" import="com.pub.web.*"%>
<%/*
      (new WebFunction()).setPortal_to_session(request); //set session from portal
      if (request.getSession().getAttribute("u_id")==null) {
         try{
            request.getRequestDispatcher((new StringBuffer("login.jsp")).insert(0,"/").toString()).forward(request,response);
            return;
         }
         catch(Exception le){
            le.printStackTrace();
            return;
         }
      }*/
%>
<jsp:useBean id="publicEncryption" scope="request" class="com.pub.encryption.PublicEncryption" />
<html>
<head>
<title>
GenerateEncrption
</title>
</head>
<body bgcolor="#ffffff">
<form action="GenerateEncrption.jsp" method="POST">
欲加密的型態：<select name="EncryptionType"><option>PUB</option><option>MD5</option><option>SHA-1</option><option>MD2</option></select><br />
欲加密的文字：<input type="text" name="srcStr" size="20" value="<%=request.getParameter("srcStr")%>"/><input type="submit" value="Encryption" /><br />
</form>
加密後的文字：<%=publicEncryption.getEncryptionString(request.getParameter("EncryptionType"),request.getParameter("srcStr")) %>
</body>
</html>
